Skip to content

Comments

feat(evm): split gas tracking into execution vs storage creation gas (TIP-1016)#2734

Merged
fgimenez merged 4 commits intotip1016from
fgimenez/chain-791
Feb 23, 2026
Merged

feat(evm): split gas tracking into execution vs storage creation gas (TIP-1016)#2734
fgimenez merged 4 commits intotip1016from
fgimenez/chain-791

Conversation

@fgimenez
Copy link
Member

Closes CHAIN-791

Adds block-level plumbing to track execution gas and storage creation gas separately in TempoBlockExecutor.

  • Added cumulative_full_gas_used and cumulative_storage_creation_gas fields to TempoBlockExecutor
  • commit_transaction now computes execution_gas = full_gas - storage_creation_gas and only execution gas counts toward block gas limits (non_shared_gas_left, non_payment_gas_left)
  • Receipts and cumulative_full_gas_used continue to track full gas (execution + storage creation)
  • finish() returns execution gas (not full gas) for the block header gas field
  • storage_creation_gas is hardcoded to 0 with a TODO — it will be populated once handler-level tracking lands (CHAIN-789 / PR feat!(evm): split intrinsic gas between regular and state gas for T2+ (TIP-1016) #2714)

Note: hardfork gating is not required. With storage_creation_gas = 0, all gas accounting is identical to the current behavior. The hardfork gate (T2) lives in the handler layer, not here. This is pure plumbing that becomes active only when upstream EVM tracking is enabled.

@fgimenez fgimenez requested a review from rakita February 17, 2026 11:17
@fgimenez fgimenez added C-enhancement New feature or request A-evm Related to the EVM labels Feb 17, 2026
@github-actions
Copy link

github-actions bot commented Feb 17, 2026

⚠️ Changelog not found.

A changelog entry is required before merging. We've generated a suggested changelog based on your changes:

Preview
---
tempo-consensus: patch
tempo-evm: minor
---

Fixed TIP-1016 consensus validation to allow block header `gas_used` to be less than or equal to the last receipt's `cumulative_gas_used`, accommodating the split between execution gas and storage creation gas. Added gas tracking fields to `TempoBlockExecutor` to separately accumulate total and storage creation gas, ensuring block headers report execution-only gas while receipts retain total cumulative gas.

Add changelog to commit this to your branch.

@fgimenez fgimenez merged commit da9635f into tip1016 Feb 23, 2026
22 of 24 checks passed
@fgimenez fgimenez deleted the fgimenez/chain-791 branch February 23, 2026 17:12
@jenpaff jenpaff added the T2 label Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-evm Related to the EVM C-enhancement New feature or request T2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants